package enumerated;

import static enumerated.Outcome.*;
public enum RoShamBo2 implements Competitor<RoShamBo2>{

    PAPER(DRAW,LOSE,WIN),
    SCISSORS(WIN,DRAW,LOSE),
    ROCK(LOSE,WIN,DRAW);

    private Outcome vPaper,vScissors,vRock;
    RoShamBo2(Outcome paper, Outcome scissors, Outcome rock){
        this.vPaper = paper;
        this.vScissors = scissors;
        this.vRock = rock;
    }

    @Override
    public Outcome compete(RoShamBo2 competitor) {
        switch (competitor){
            default:
            case PAPER: return vPaper;
            case ROCK: return vRock;
            case SCISSORS: return vScissors;
        }
    }

    public static void main(String[] args) {
        RoShamBO.play(RoShamBo2.class,20);
    }
}
